cmake_minimum_required(VERSION 3.10)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
include_directories(${TASKBUS_INTERFACEDIR})
set(PRJ_SOURCES
	main.cpp
	mod_fm.cpp
)
#############Target======================

add_executable(mod_fm
	${PRJ_SOURCES}
)
target_link_libraries(mod_fm
	Qt${QT_VERSION_MAJOR}::Core
	${TBLinkExtra}
)

# ====copy doc
add_custom_command(TARGET mod_fm
		 POST_BUILD
		 COMMAND echo Copy Handbook to EXE path
		 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/readme.md ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/mod_fm.md
	 )
